{% extends "base.html" %}
{% block title %}妖孽 | {{ post.title }}{% endblock %}
{% block content %}
                    <div class="single-navigation clear-block">
                          <div class="single-navigation clear-block">
                                <div class="alignleft"></div>
                                <div class="alignright"><a href="#" rel="next">RSS 2.0订阅(待添加)</a> »</div>
                          </div>
                          <div class="hentry post post-1 odd author-will category-will post_tag-will-blog single">
                              <h1 class="title">{{ post.title }}</h1>
                              <div class="post-content clear-block">{{ post.body|safe }}</div>
                              <div class="post-tags">
                                {% for tag in post.tag_set.all %}
                                <a href="/tag/{{tag.name}}" rel="tag"> {{ tag.name }} </a>
                                {% endfor %}
                              </div>
                          </div>
                          <table class="post-meta"><tbody>
                              <tr>
                                  <td class="details">
                                      这篇文章由<a href="/" title="yaonie ">{{ post.user }}</a>于{{ post.created|date:"Y/m/d"}} 发表在<a href="/">{{ post.area }}</a>。你可以订阅<a href="#" title="RSS 2.0">RSS 2.0</a> 也可以<a href="#respond">发表评论</a>或<a href="#" rel="trackback">引用</a>到你的网站.
                                   </td>
                              </tr>
                          </tbody></table>
                          
                          <div class="tabbed-content post-tabs clear-block" id="post-tabs">

  <!-- tab navigation (items must be in reverse order because of the tab-design) -->
                            <div class="tabs-wrap clear-block">
                                <ul class="tabs">
                                    <li class="comments active"><a href="#section-comments"><span>评论（{{ post.comment_set.count}}）</span></a></li>  </ul>
                            </div>
                          </div>
                          
                          <div class="sections">

    <!-- comments -->
  <div class="section clear-block" id="section-comments">

         <div id="comments-wrap">
      <div class="clear-block">
       <ul id="comments" class="comments">
        {% for comm in post.comment_set.all%}
  <!-- comment entry -->
  <li class="comment even thread-even depth-1 withAvatars reader name-will" id="comment-5">
    <div class="comment-head comment odd alt thread-odd thread-alt depth-1 withAvatars reader name-will">

      <div class="avatar-box"><img alt="" src="/site_media/pic/astro.jpg" class="avatar avatar-48 photo" height="48" width="48"></div>      <div class="author">
       
        <span class="by"><a class="comment-id" href="#comment-5">#{{ forloop.counter }}</a> <b class="comment-author" id="comment-author-5"> {{ comm.name}} </b> </span>
        <br>
        {{ comm.created|date:"Y/m/d" }}      
        {%if user.is_superuser%}
        <a href="/comment/{{comm.id}}/delete" class="delete-style" style="float:right">删除</a>
        {% endif %}
        </div>
    </div>
    <div class="comment-body clear-block" id="comment-body-5">
            <div class="comment-text"><p>{{ comm.content }}</p>
</div>
      <a id="comment-reply-5"></a>
    </div>
</li>
{% endfor %}
       </ul>
      </div>
          </div>
          <div class="comment-form " id="respond">
          <h2>Leave a Reply</h2>
          {%for field in comment%}
         <p>{{field}}{{ field.label_tag }}</p>
          {% endfor %}
            <input type="submit" value="提交评论" id="submit_comment" pid="{{ post.id }}" kind="post"/>
          </div>
 </div>
{% endblock %}
